<html><head><title>AddPathCurve</title></head>
<body bgcolor="#EFF1F0" link="#3A3966" vlink="#000000" alink="#000000">
<font face="Verdana, sans-serif" size="2"><p align="center"><b><font size="4">AddPathCurve()</font></b></p>
<p><b>Syntax</b></p><blockquote>
<font color="#3A3966"><b>AddPathCurve</b></font>(x1.d, y1.d, x2.d, y2.d, x3.d, y3.d [, Flags])</blockquote>

</blockquote>
<b>Description</b><br><blockquote>

Adds a cubic bezier curve to the vector drawing path. The curve starts at the 
current path position and ends at (x3, y3). The other two points determine the 
shape of the curve. 

</blockquote><p><b>Parameters</b></p><blockquote>
<style type="text/css">
table.parameters { border-spacing: 0px; border-style: none; border-collapse: collapse; }
table.parameters td { border-width: 1px; padding: 6px; border-style: solid; border-color: gray; vertical-align: top; font-family:Arial; font-size:10pt; }
</style>
<table width="90%" class="parameters">
<tr><td width="10%"><i>x1.d, y1.d</i></td>
<td width="90%"> 
The first control point of the curve. 

</td></tr>
<tr><td><i>x2.d, y2.d</i></td>
<td> 
The second control point of the curve. 

</td></tr>
<tr><td><i>x3.d, y3.d</i></td>
<td> 
The endpoint of the curve. This point will become the new path position. 

</td></tr>
<tr><td><i>Flags (optional)</i></td>
<td> 
Can be one of the following values: 
<pre><font face="Courier New, Courier, mono"size="2">  <font color="#924B72">#PB_Path_Default</font> : The positions are absolute (default)
  <font color="#924B72">#PB_Path_Relative</font>: The positions are relative to the last cursor position.
</font></pre>

</td></tr>
</table>
</blockquote><p><b>Return value</b></p><blockquote>
None.


</blockquote><p><b>Remarks</b></p><blockquote>

The below image shows the position of the reference points. 
See <a href="http://en.wikipedia.org/wiki/B%C3%A9zier_curve">here</a> for more information on 
bezier curves. 

<p><img src="../HelpPictures/addpathcurve.png"></p>

</blockquote><p><b>Example</b></p><blockquote>


<pre><font face="Courier New, Courier, mono"size="2">  <b><font color="#3A3966">If</font></b> <font color="#3A3966">OpenWindow</font>(0, 0, 0, 400, 200, &quot;VectorDrawing&quot;, <font color="#924B72">#PB_Window_SystemMenu</font> | <font color="#924B72">#PB_Window_ScreenCentered</font>)
<font color="#3A3966">    CanvasGadget</font>(0, 0, 0, 400, 200)

    <b><font color="#3A3966">If</font></b> <font color="#3A3966">StartVectorDrawing</font>(<font color="#3A3966">CanvasVectorOutput</font>(0))

<font color="#3A3966">      MovePathCursor</font>(50, 100)
<font color="#3A3966">      AddPathCurve</font>(90, 30, 250, 180, 350, 100)
<font color="#3A3966">      VectorSourceColor</font>(<font color="#3A3966">RGBA</font>(255, 0, 0, 255))
<font color="#3A3966">      StrokePath</font>(10)
    
<font color="#3A3966">      StopVectorDrawing</font>()
    <b><font color="#3A3966">EndIf</font></b>
    
    <b><font color="#3A3966">Repeat</font></b>
      Event =<font color="#3A3966"> WaitWindowEvent</font>()
    <b><font color="#3A3966">Until</font></b> Event = <font color="#924B72">#PB_Event_CloseWindow</font>
  <b><font color="#3A3966">EndIf</font></b>
</font></pre>

</blockquote><p><b>See Also</b></p><blockquote>

<a href="movepathcursor.html">MovePathCursor()</a>, <a href="addpathline.html">AddPathLine()</a>, <a href="addpatharc.html">AddPathArc()</a>, 
<a href="addpathcircle.html">AddPathCircle()</a>, <a href="addpathellipse.html">AddPathEllipse()</a>, <a href="addpathbox.html">AddPathBox()</a> 

</Blockquote><p><b>Supported OS </b><Blockquote>All</Blockquote></p><center><- <a href=addpathcircle.html>AddPathCircle()</a> - <a href="index.html">VectorDrawing Index</a> - <a href="addpathellipse.html">AddPathEllipse()</a> -><br><br>

</body></html>